﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Entities
{
    public class Group : BaseEntity<int>
    {
        public Group(Direction direction)
        {
            this.Direction = direction;
        }

        public Group()
        {
            this.Direction = new Direction();
            this.LoadAtoms = new List<LoadAtom>();
        }

        public virtual string GroupTitle { get; set; } 
        public virtual int Course { get; set; }
        public virtual int StudentCount { get; set; }
        public virtual Direction Direction { get; set; }
        public virtual IList<LoadAtom> LoadAtoms { get; set; }
        
        public virtual void AddAtom(LoadAtom atom)
        {
            atom.Groups.Add(this);
            LoadAtoms.Add(atom);
        }
    }
}